//
//  CourseDBService.m
//  NJUSTHelper
//
//  Created by 郑越辉 on 2017/9/20.
//  Copyright © 2017年 njust. All rights reserved.
//

#import "CourseDBService.h"

@implementation CourseDBService

+(NSInteger)removeAllCourse4UserId:(NSString *)userId{
    if ([userId length] == 0) {
        return 0;
    }
    return [[DataBase sharedDataBase] removeAllCourse4UserId:userId];
}

+(NSInteger)addCoursesToDataBaseWithModel:(NSMutableArray *)courseArray{
    if ([courseArray count] == 0) {
        return 0;
    }
    return [[DataBase sharedDataBase] addCoursesWithArray:courseArray];
}


/* 获取用户的所有课程 */
+(NSMutableArray *)getAllCourseByUserId:(NSString *)userId{
    if ([userId length] == 0) {
        return nil;
    }
    return [[DataBase sharedDataBase] getAllCourseByUserId:userId];
}

@end
